This invention relates to a method and apparatus for processing data packets. It can be used in processing Internet Protocol (IP) packets.
Packet and cell-based transport protocols are gaining acceptance for their ability to carry a wide range of traffic types such as voice, data and video. Internet protocol (IP) is widely gaining acceptance in the industry as a networking protocol that provides communication across interconnected networks and between computers with diverse hardware architectures and operating systems. The International Telecommunications Union (ITU) H.323 and the Internet Engineering Taskforce""s Session Initiation Protocol (SIP) protocol suites are both being developed as standards for IP and internet telephony. FIG. 1 shows a typical way in which voice data is processed for transport over an IP network. Firstly, voice data is received (2) and is often compressed (4) and forms the payload of a data packet. The data packet is routed through an IP stack (6) which adds routing and other overhead information to the packet. Finally, the assembled data packet is transmitted over the data network (8). As shown in FIG. 2, this results in a stream of packets 74-77, each packet comprising an overhead or header section 70 and a payload section 72. Each data packet is processed in this same manner, i.e. the overhead section 70 of each of the packets 74-77 is generated by routing the packet through the IP stack. The step of routing the data packet through the IP stack is often performed by software and places a high demand on the system processor. The demands on the processor are further compounded by the fact that the data is real time voice data which requires real time processing to avoid distracting delays to the voice signal.
The present invention seeks to provide a more efficient way of processing data packets.
A first aspect of the invention provides a method of processing a received data stream which is intended for transmission in packet form over a data network, the method comprising:
forming the data into a stream of packets, each packet comprising a payload section of data and an overhead section;
and wherein the step of forming the packets creates a template overhead section for use by the stream of packets and applies the template to the data to form the packets.
Generating a template overhead, or header, section for use by the stream of packets has significant advantages. The overhead data need only be generated once rather than for every packet in the stream. This significantly reduces the processing demands on the processor which constructs the data packets. This can allow a cheaper microprocessor to be used or the same microprocessor can support more channels of traffic processing than was previously possible. It can also reduce the transmission delay experienced by data, which improves the quality of the traffic carried by the data.
Preferably the step of creating the template creates a template which includes routing information for the packet. The template overhead section can be formed by sending a packet through a routing stack. Subsequent data to which the template is applied is not passed through the routing stack, thereby saving considerable processing resources.
Preferably the method further comprises:
generating a packet which can subsequently be identified as a template packet;
and wherein the template overhead section is formed by:
sending this template packet through the routing stack;
subsequently identifying the packet as a template packet; and,
using the routing information that has been applied to the template packet by the routing stack to form the template overhead section.
A template structure can be created in memory and the packet which is passed through the routing stack can include a pointer to this template structure. This pointer can be held in the payload of the packet which is passed through the routing stack and the structure can include an identifier that the packet is a template packet.
Advantageously the routing information is copied from the template packet to the template structure. This subsequent identification of the packet as a template packet, and copying of information to the structure can be performed at the data link layer. This method is totally independent of the internal workings of the routing stack, since the stack operates on a payload of data in the normal fashion to generate the usual routing and other overhead information. It is the subsequent inspection of the packet by the data link layer which reveals that the packet is a template packet and which causes the template structure to be filled with the overhead information.
If required, a new template overhead section can be created periodically during the duration of the data stream.
The templating method is only suitable for selected packet types. Therefore it is preferable to include the further step of determining the type of packet and only performing the steps of generating a template and applying the template on selected packet types. The templating method is particularly suitable for Realtime Transport Protocol (RTP) and User Datagram Protocol (UDP) packet types.
Further advantages can be gained by creating the template packet using a first processor and applying the template to the data using a second processor. Advantageously, the second processor is a processor that has lower functionality than the first, and can be a co-processor of the first processor; a reduced instruction set (RISC) processor, or a field programmable gate array (FPGA).
Another aspect of the invention provides apparatus for processing a received data stream which is intended for transmission in packet form over a data network, the apparatus comprising:
a processor for forming the received data into a stream of packets, each packet comprising a payload section of data and an overhead section;
and wherein the processor is arranged to form the packets by creating a template overhead section for use by the stream of packets and applying the template to the data to form the packets.
The apparatus may be embodied entirely in hardware, or a combination of software and hardware.
The method may be implemented as software code which controls a processor. Accordingly, a further aspect of the invention provides software code for performing the method. The code may be stored on a machine-readable medium such as a diskette, optical disc or memory device.
A further aspect of the invention provides a method of processing data packets, the packets being of two types: signalling packets and real-time packets carrying realtime data, the method comprising the steps of:
processing the signalling packets by a first processor; and,
processing the real-time data packets by a second processor.
Advantageously the second processor is a processor that has lower functionality than the first. This considerably relieves the processing demand on the first processor and can result in an arrangement which is cheaper than one that uses a set of full-functionality processors. Advantageously the second processor is one of: a co-processor of the first processor; a reduced instruction set (RISC) processor, and a field programmable gate array (FPGA).
When transmitting data packets, further advantages can be gained by generating, using the first processor, a template overhead section for use by a stream of real-time data packets and applying, using the second processor, the template to the real-time data packets.
Preferred features may be combined as appropriate and may be combined with any of the aspects of the invention, as would be apparent to a person skilled in the art.